import pygame


class Hammer(pygame.sprite.Sprite):
    def __init__(self, dims, size, img, angle, position):
        super().__init__()
        self.dims = dims
        self.width, self.height = dims
        self.image = pygame.transform.flip(pygame.transform.scale(pygame.transform.rotate(img, angle), size), True, False)

        # self.spriteScale = pygame.transform.scale(self.image, (50, 50))
        # self.image.fill((random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)))
        self.rect = self.image.get_rect()

        self.rect.center = (position)

    def draw(self, screen):
        screen.blit(self.image, self.rect)